public class ListIterator implements Iterator{
        List list;
        Element current;

        public ListIterator(List _list){
                list = _list;
                current = null;
        }
        
        public Object CurrentItem(){
                return current.getData();
        }
        
        public void First() {
                current = list.getFirst();
        }

        public void Next() {
                if(current != null)
                        current = current.getNext();
        }

        public boolean IsDone() {
                if(current == null)
                        return false;
                return true;
        }       
}
